package com.android.lovely.room.role

import android.os.Parcelable
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.android.lovely.R
import com.kotlin.extensions.appContext
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import kotlinx.parcelize.Parcelize

/**
 *
 * @author why
 * @date 2025/4/6 17:13
 */

@Parcelize
@Entity
@JsonClass(generateAdapter = true)
data class CreateRole(
    @PrimaryKey(autoGenerate = false) @Json(name = "id") var id: Int = 0,
    @ColumnInfo(name = "name") @Json(name = "nick_name") var nickName: String = "",
    @ColumnInfo(name = "avatar") @Json(name = "avatar") var avatar: String = "",
    @ColumnInfo(name = "gender") @Json(name = "gender") var gender: Int = 2,
    @ColumnInfo(name = "nsfw") @Json(name = "nsfw") var nsfw: Boolean = true,
    @ColumnInfo(name = "public") @Json(name = "public") var public: Boolean = true,
    @ColumnInfo(name = "category") @Json(name = "category") var category: Int = 2,//分类 1=二次元 2=真实
    @ColumnInfo(name = "introduction") @Json(name = "introduction") var introduction: String = "",//人物简介
    @ColumnInfo(name = "search_tag") @Json(name = "search_tag") var keywords: List<String> = emptyList(),
    @ColumnInfo(name = "description") @Json(name = "description") var description: String = "",//人物描述
    @ColumnInfo(name = "scenario") @Json(name = "scenario") var scenario: String = "",//场景示例
    @ColumnInfo(name = "first_message") @Json(name = "first_message") var firstMessage: String = "",//第一句话术
    @ColumnInfo(name = "chat_example") @Json(name = "chat_example") var chatExample: String = "",//对话示例
    @ColumnInfo(name = "card_list") @Json(name = "card_list") var cards: List<NewCard> = emptyList(),
    @ColumnInfo(name = "create_id") @Json(name = "create_id") var createId: Int = -1,
    @ColumnInfo(name = "bot_id") @Json(name = "bot_id") var botId: Int = -1,
    @ColumnInfo(name = "status") @Json(name = "status") var status: Int = 0,//1=待审核 2=审核通过 3=审核被拒绝
    @ColumnInfo(name = "statusReply") @Json(name = "statusReply") var statusReply: String = "",//1=待审核 2=审核通过 3=审核被拒绝
    @ColumnInfo(name = "create_time") @Json(name = "create_time") var createTime: Long = System.currentTimeMillis()
) : Parcelable

@Parcelize
@JsonClass(generateAdapter = true)
data class NewCard(
    @Json(name = "locale_path") val localePath: String = "",
    @Json(name = "url") var url: String = "",
    @Json(name = "width") val width: Int = 0,
    @Json(name = "height") val height: Int = 0,
    @Json(name = "id") var id: Int? = null,
) : Parcelable

@JsonClass(generateAdapter = true)
data class NewPrice(
    @Json(name = "intimacy") val intimacy: Int = 0,
    @Json(name = "point") val point: Int = 0
)